package no.ciber.kartdemo.facebook.client;

import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import com.google.code.facebookapi.schema.User;

public class FacebookUsersFilter {

	public FacebookUsersFilter() {

	}

	public Collection<User> filtrerKjonn(List<User> brukere) {
		Set<User> output = new HashSet<User>();
		for (User current : brukere) {
			if ("kvinne".equals(current.getSex())
					|| "female".equals(current.getSex())) {
				output.add(current);
			}
		}
		return output;
	}

	public Collection<User> filtrerSingle(List<User> brukere,
			boolean harHentetFullInfo) {
		Set<User> output = new HashSet<User>();
		for (User current : brukere) {
			if ("Det er komplisert".equalsIgnoreCase(current.getSex())
					|| "singel".equalsIgnoreCase(current.getSex())) {
				output.add(current);
			}
		}
		return output;
	}
}
